// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsICookie2.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    /// Main cookie object interface for use by consumers:
    /// extends nsICookie, a frozen interface for external
    /// access of cookie objects
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("05c420e5-03d0-4c7b-a605-df7ebe5ca326")]
	public interface nsICookie2 : nsICookie
	{
		
		/// <summary>
        /// the name of the cookie
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		new void GetNameAttribute([MarshalAs(UnmanagedType.LPStruct)] nsACStringBase aName);
		
		/// <summary>
        /// the cookie value
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		new void GetValueAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aValue);
		
		/// <summary>
        /// true if the cookie is a domain cookie, false otherwise
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		new bool GetIsDomainAttribute();
		
		/// <summary>
        /// the host (possibly fully qualified) of the cookie
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		new void GetHostAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aHost);
		
		/// <summary>
        /// the path pertaining to the cookie
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		new void GetPathAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aPath);
		
		/// <summary>
        /// true if the cookie was transmitted over ssl, false otherwise
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		new bool GetIsSecureAttribute();
		
		/// <summary>
        /// @DEPRECATED use nsICookie2.expiry and nsICookie2.isSession instead.
        ///
        /// expiration time in seconds since midnight (00:00:00), January 1, 1970 UTC.
        /// expires = 0 represents a session cookie.
        /// expires = 1 represents an expiration time earlier than Jan 1, 1970.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		new ulong GetExpiresAttribute();
		
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		new System.IntPtr GetStatusAttribute();
		
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		new System.IntPtr GetPolicyAttribute();
		
		/// <summary>
        /// the host (possibly fully qualified) of the cookie,
        /// without a leading dot to represent if it is a
        /// domain cookie.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetRawHostAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aRawHost);
		
		/// <summary>
        /// true if the cookie is a session cookie.
        /// note that expiry time will also be honored
        /// for session cookies (see below); thus, whichever is
        /// the more restrictive of the two will take effect.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetIsSessionAttribute();
		
		/// <summary>
        /// the actual expiry time of the cookie, in seconds
        /// since midnight (00:00:00), January 1, 1970 UTC.
        ///
        /// this is distinct from nsICookie::expires, which
        /// has different and obsolete semantics.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		long GetExpiryAttribute();
		
		/// <summary>
        /// true if the cookie is an http only cookie
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetIsHttpOnlyAttribute();
		
		/// <summary>
        /// the creation time of the cookie, in microseconds
        /// since midnight (00:00:00), January 1, 1970 UTC.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		long GetCreationTimeAttribute();
		
		/// <summary>
        /// the last time the cookie was accessed (i.e. created,
        /// modified, or read by the server), in microseconds
        /// since midnight (00:00:00), January 1, 1970 UTC.
        ///
        /// note that this time may be approximate.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		long GetLastAccessedAttribute();
	}
}
